home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / as5.zip / OUTPUT.C < prev    next >
C/C++ Source or Header  |  1987-12-09  |  859b  |  43 lines

  1. /*
  2.  *  stable --- prints the symbol table in alphabetical order
  3.  */
  4. stable(ptr)
  5.  
  6. struct nlist *ptr;
  7. {
  8.   if (ptr != NULL)
  9.     {
  10.       stable (ptr->Lnext);
  11.         printf ("%-10s %04x\n",ptr->name,ptr->def);
  12.       stable (ptr->Rnext);
  13.     }
  14. }
  15. /*
  16.  *  cross  --  prints the cross reference table 
  17.  */
  18. cross(point)
  19.  
  20. struct nlist *point;
  21. {
  22. struct link *tp;
  23. int i = 1;
  24.   if (point != NULL)
  25.     {
  26.       cross (point->Lnext);
  27.         printf ("%-10s %04x *",point->name,point->def);
  28.          tp = point->L_list;
  29.           while (tp != NULL)
  30.            {
  31.              if (i++>10)
  32.               {
  33.                i=1;
  34.                printf("\n                      ");
  35.               }
  36.               printf ("%04d ",tp->L_num);
  37.                tp = tp->next;
  38.            }
  39.          printf ("\n");
  40.       cross (point->Rnext);
  41.     }
  42. }
  43.